let h1 = document.querySelector('.title'),
    result = document.querySelector('.result');
h1.textContent = '请求中..';
fetch('https://gist.githubusercontent.com/moi-xiey/e0417eeb45a98a76a1ff153b50caf259/raw/00e965dd97768b704ff9157e85d0a043675de296/gistfile1.txt', {
    method: 'GET'
}).then(function (res) {
    return res.json();
}).then(function (data) {
    h1.textContent = '请求完成!';
    result.textContent = JSON.stringify(data);
    console.log(data);
});